package com.hotel.project.demo.service.impl;

import com.hotel.project.demo.dao.hotel.HotelPictureDao;
import com.hotel.project.demo.domain.HotelPictureEntity;
import com.hotel.project.demo.service.HotelPictureService;
import org.springframework.stereotype.Service;

@Service
public class HotelPictureServiceImpl extends CurdServiceImpl<HotelPictureEntity> implements HotelPictureService {
    /**
     * 根据id或标题删除图片
     * @param id
     * @param title
     * @return
     */
    @Override
    public boolean hotelPictureDelete(Long id, String title) {
        Boolean b = false;
        try {
            b = ((HotelPictureDao)getBaseMapper()).deleteHotelPicturesByIdOrTitle(id, title);
        }catch (Exception e){
            e.printStackTrace();
            return false;
        }
        return b;
    }
}
